package com.tiancheng.trade.order.enums;

import com.tiancheng.trade.commom.core.enums.BaseEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author: likailun
 * @Description: 银联交易类型枚举
 * @Date: create in 2021/8/31 10:29 上午
 */
@Getter
@AllArgsConstructor
public enum UmsTradeTypeEnum implements BaseEnum<String> {

    QUERY_BANK_LIST("0520001903", "服务中"),
    BINDING_CARD_REQ("0470001903", "绑卡申请"),
    UNBOUND_CARD_REQ("0480001903", "解绑申请"),
    BINDING_CAR_QUERY_REQ("0500001903", "绑卡查询"),
    unionpay_unbounded_req("0510001903", "云闪付APP主动发起的解绑请求"),
    BINDING_NOTICE("0490001903", "绑卡通知");


    private String code;
    private String desc;

    public static String getDesc(String code) {
        UmsTradeTypeEnum[] businessModeEnums = values();
        for (UmsTradeTypeEnum statusEnum : businessModeEnums) {
            if (statusEnum.code().equals(code)) {
                return statusEnum.desc();
            }
        }
        return null;
    }


    public String code() {
        return this.code;
    }

    public String desc() {
        return this.desc;
    }

}
